﻿package net.wangit.view.element;

import net.wangit.Page;
import net.wangit.Row;
import net.wangit.context.ActionContext;
import net.wangit.framework.expression.LabelExpression;
import net.wangit.support.ElementWriter;
import net.wangit.view.util.Html;

public final class AutoLabelElement extends ElementComponent {

	public AutoLabelElement(String name) {
		this.name = name;
	}

	public void write(ActionContext ac, StringBuffer html, int rowIndex, Row row) {
		Html.set(html, LabelExpression.resolve(ac, name));
	}

	public void writeTd(ActionContext ac, StringBuffer html, int rowIndex) {
		html.append("<td>");
	}

	public int getTdColSpan() {
		return 1;
	}

	public int getTdRowSpan() {
		return 1;
	}

	protected void cloneAfter(ActionContext actioncontext, Page page1) {
	}

	protected void configure(Row row1) {
	}

	protected ElementWriter getWriter() {
		return null;
	}
}
